<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<html>
<head>
   	<jsp:include page="head.jsp"></jsp:include>
</head>
<body style="margin:0;padding:0;height:100%;overflow:hidden;background:#F2FBFF">
	<form id="userform" method="post">
		<input type="hidden" id="userId" name="id" value=""/>
	</form>
	<div class="easyui-layout" fit="true">
		<div region="north" border="false">
			<div class="toolbar">
				<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newItem()">新增用户</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editItem()">修改用户</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="delItem()">删除用户</a>

			</div>
			<div style="padding-left:5px;padding-top:5px;">
				 <table style="border:1px solid #AEDEF2;border-collapse: collapse;">
				<tr>
					<td style="width:80px">登录ID:</td>
						<td><input type="text" id="qloginid" class="query" name="qlogonid" style="width:80px"></input></td>
						<td style="width:80px">启用状态：</td>
						<td><select id="qstatus" class="easyui-combobox query" name="qstatus" style="width:120px" readonly="true"  panelHeight="auto">
												<option value="-1">不选</option>
												<option value="1">启用</option>
												<option value="0">禁用</option>
												<option value="2">冻结</option>
											</select></td>

						<td rowspan="2" style="width:110px" align="center">
				        <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="searchUsers()">搜索</a>
				        </td>
						</tr>
						<tr>
						<td style="width:80px">用户姓名：</td>
						<td><input type="text" id="quserName" class="query" name="quserName" style="width:80px"></input></td>						
						
						<td style="width:90px">所属公司:</td>
						<td>
						<input id="qcompanyId" name="qcompanyId" class="easyui-combotree" style="width:120px" >					
						</td>
																										
					</tr>
				</table>
			</div>					
		</div>

		<div region="center" border="false">

			<table id="t-users" class="easyui-datagrid"
					url="<c:url value='/permissions/getPageUser.tg'/>"
					method="post"
					singleSelect="true" pagination="true"					
					border="false" striped="true" fit="true">
				<thead>
					<tr>
						<th field="ck" checkbox="true"></th> 
						<th field="logonid" width="100">登录名</th>
						<th field="name" width="100">用户姓名</th>
						<th field="workNumber" width="100">工号</th>
						<th field="isSa" width="100" formatter="yesornoFormatter">是否客户经理</th>
						<th field="usertype" width="100" formatter="usertypeFormatter">用户类别</th>
						<th field="companyName" width="150">公司</th>
						<th field="deptName" width="100">部门</th>						
						<th field="phone" width="100">办公电话</th>	
						<th field="sex" width="50" formatter="sexFormatter">性别</th>					
						<th field="email" width="150">邮箱</th>

						<th field="status" width="100" formatter="statusFormatter">状态</th>
						<th field="memo" width="300">职业经历</th>
						<th field="ext2" width="300">服务宣言</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	
	<div id="dlg" style="width:430px;height:400px;"
			class="easyui-dialog" closed="true" modal="true" buttons="#dlg-buttons">
		<div style="padding-left:50px;padding-top:20px;">
			<div style="float:center">
				<form id="myform" method="post" style="margin:0;padding:0">
					<jsp:include page="form.jsp"></jsp:include>
				</form>
					<table  id="upUserImage">
						<tr>
						
							<td style="width: 100px">照片</td>
							<td>
								 <img id="userImage" alt="个人靓照"  width="150px;" height="150px;" src=""/>
							</td>
						</tr>					
						<tr>
						
							<td style="width: 100px">照片</td>
							<td>
								 <input type="file" name="upload" id="upload" title="选择照片上传" />
								 <a id="uploadFile" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="ajaxFileUpload()">
					                        	上传照片</a>
							</td>
						</tr>
					</table>					
			</div>
			<div style="clear:both"></div>
		</div>
		<div id="dlg-buttons" style="text-align:center;">
			<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="saveItem()">保存</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
		</div>
	</div>
	<div id="progressNumber" class="easyui-progressbar" style="width: 400px;">
	</div>
</body>
</html>
